package service

import (
	"ksd-social-api/commons/base/service"
	"ksd-social-api/modules/msg/mapper"
	"ksd-social-api/modules/msg/model"
)

type MessagePointService struct {
	service.BaseService
}

var messagePointMapper = mapper.MessagePointMapper{}

/**
 * 查询用户消息的时间点
 * @author feige
 * @date 2023-12-15
 * @version 1.0
 * @desc
 */
func (mapper *MessagePointService) GetMessageUserPoint(userId uint64, systemId uint64) *model.MessagePoint {
	return messagePointMapper.GetMessageUserPoint(userId, systemId)
}

/**
 * 修改消息过期时间
 * @author feige
 * @date 2024-01-07
 * @version 1.0
 * @desc
 */
func (mapper *MessagePointService) SaveMessagePonit(userId uint64, systemId uint64, uuid string, stype int) bool {
	return messagePointMapper.SaveMessagePonit(userId, systemId, uuid, stype)
}

/**
 * 修改消息过期时间
 * @author feige
 * @date 2024-01-07
 * @version 1.0
 * @desc
 */
func (mapper *MessagePointService) SaveMessagePonitDefault(userId uint64, systemId uint64, uuid string) bool {
	return messagePointMapper.SaveMessagePonitDefault(userId, systemId, uuid)
}
